<template>
  <div class="box">
    <div class="head">
      <span>新品抢先</span>
      <span class="right"
        >查看更多
        <span class="iconfont icon-xiangyou1"></span>
      </span>
    </div>
    <div class="contentbox">
      <div class="content" v-for="(good, index) in good" :key="index">
        <div class="headline">{{ good.name }}</div>
        <div class="profile">{{ good.profile }}</div>
        <div class="buy">{{ good.label }}</div>
        <img :src="good.img" alt="" />
        <div class="price">
          <span class="nowprice">￥{{ good.new }}</span>
          <span class="oldprice">￥{{ good.old }}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
//chuang
export default {
  name: "NewDian",
  data() {
    return {
      good: [
        {
          name: "小米新风空调",
          profile: "通新风 才健康",
          new: "1999",
          old: "2199",
          label: "立即抢购",
          img: "https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/d1b5b0d17a7135438c38ac06c806fb4d.png?thumb=1&w=280&h=280",
        },
        {
          name: "直驱波轮 10kg",
          profile: "智能投放",
          new: "1999",

          label: "立即预定",
          img: "https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/5634bd477e53af7d6e14ba0a30017c17.png?thumb=1&w=280&h=280",
        },
        {
          name: "风冷冰箱",
          profile: "离子除菌",
          new: "1399",
          old: "1499",
          label: "立即抢购",
          img: "https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/62a99b72d01629957322df59b43de86e.png?thumb=1&w=280&h=280",
        },
      ],
    };
  },
};
</script>

<style scoped>
.box {
  width: 100%;
  padding: 0 0.1rem;
  display: flex;
  flex-direction: column;
  margin-top: 0.1rem;
  box-sizing: border-box;
  background-color: transparent;
}
.head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  line-height: 0.22rem;
}
.right {
  font-size: 12px;
  color: rgb(185, 176, 176);
}

.contentbox{
    width: 100%;
    display: flex;
    justify-content: space-between;
}
.content{
    width: 1.1rem;
    height: 1.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    border-radius: .1rem;
    justify-content: space-around;
}
img{
    width: .75rem;
    height: .75rem;
}
.profile{
    font-size: 12px;
    font-weight: 200;
}
.buy{
    font-size: 12px;
    border-radius: 5px;
    background-color: rgba(247, 240, 240,0.5);
    font-weight: 200;
}
.price{
    font-weight: 200;
    font-size: 12px;
}
.content:nth-child(1){
    background-color: rgb(136, 74, 235);
}
.content:nth-child(2){
    background-color: rgb(98, 187, 238);
}
.content:nth-child(3){
    background-color: rgb(240, 115, 233);
}
</style>